import React from 'react';

class Test extends React.Component {
    constructor(props) {
        super(props)
        this.state = {
            count:1,
            ss: 2
        }
    }
    // state = {
    //     count:1,
    //     ss: 2
    // }

    test(num) {
        let { count } = this.state;
        // a = 1
        this.setState({count:2 , ss: 2})
        console.log(!!count, num)
    }

    componentDidMount() {
        // console.log(this.props)
    }
    render() {
        let {nodes} = this.props
        return(
            <div onClick={() => this.test(2)}>test{nodes}</div>
        )
    }
}


export default Test